﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SCMS.Model;

namespace SCMS.CoreBusinessLogic.Budgeting
{
    public interface IBudgetService
    {
        void CreateBudgetCategory(BudgetCategory budgetCategory, ProjectDonor pd);
        void UpdateBudgetCategory(BudgetCategory budgetCategory);
        void DeleteBudgetCategory(BudgetCategory budgetCategory);
        void DeleteBudgetCategory(string id);
        void CreateBudgetLine(ProjectBudget bsl);
        void UpdateBudgetLine(ProjectBudget bsl);
        void DeleteBudgetLine(ProjectBudget bsl);
        void DeleteBudgetLine(string id);
        List<BudgetCategory> GetBudgetCategories(ProjectDonor pd);
        List<ProjectBudget> GetBudgetLines(BudgetCategory bc);
        BudgetCategory GetBudgetCategoryById(string id);
        BudgetCategory GetBudgetCategoryByNumber(string number, Guid projectDonorId);
        ProjectBudget GetBudgetLineById(string id);
        ProjectBudget GetBudgetLineByNumber(string number, string bcId);
        void AddBudgetLines(ProjectDonor pd, List<ProjectBudget> budget);
        void SaveBudgetLines(ProjectDonor pd, List<ProjectBudget> budgetLines);
        List<ProjectBudget> GetProjectBugdetLines(ProjectDonor pd);
        List<ProjectDonor> GetProjectDonors(CountryProgramme prog);
        void SaveBudgetLine(ProjectBudget budgetLine);
        void DeleteBudgetLine(ProjectBudget budgetLine, ref ProjectDonor pd);
        List<ProjectBudget> GetProjectBLByCategory(ProjectDonor pd, BudgetCategory bc);
        List<ProjectBudget> GetBudgetLinesNotInBudget(ProjectDonor pd, BudgetCategory bc);
        List<ProjectBudget> GetBudgetLinesNotInMB(BudgetCategory bc);
        List<ProjectBudget> GetBudgetLinesByMBCategory(MasterBudgetCategory mbc, ProjectDonor pd);
        void LinkBudgetLineToMasterBudget(string blId, string mbcId);
        void UnLinkBudgetLineToMasterBudget(string blId);
        ProjectBudget GetProjectBudgetById(string id);
        bool SufficientFundsAvailable(decimal amount, string budgetLineId, string currencyId, Guid poId, Guid rfpId, Guid orItemId);
        List<FinanceLimit> GetFinanceLimits(Guid countryProgId);
        void SaveFinanceLimit(FinanceLimit fl);
        FinanceLimit GetFinanceLimitById(Guid Id);
        void DeleteFinanceLimit(Guid flId);
    }
}
